<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - jqGird</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link th:href="@{../../back/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet">
    <link th:href="@{../../back/css/font-awesome.css?v=4.4.0}" rel="stylesheet">

    <!-- jqgrid-->
    <link th:href="@{../../back/css/plugins/jqgrid/ui.jqgrid.css?0820}" rel="stylesheet">

    <link th:href="@{../../back/css/animate.css}" rel="stylesheet">
    <link th:href="@{../../back/css/style.css?v=4.1.0}" rel="stylesheet">

    <style>
        /* Additional style to fix warning dialog position */

        #alertmod_table_list_2 {
            top: 900px !important;
        }
        .ui-jqgrid .ui-jqgrid-hbox{
            padding-right:0;
        }
        .table.table-bordered{
            width: 100% !important;
        }
    </style>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox ">

                <div class="ibox-content">

                    <div class="ibox-content">
                        <form role="form" class="form-inline">
                            <div class="form-group">
                                会员ID：<input type="text" placeholder="请输入会员ID" id="queryMemberId" class="form-control">
                            </div>
                            <button class="btn btn-white" type="button" id="queryButton">查询</button>
                        </form>
                    </div>


                    <div class="jqGrid_wrapper">
                        <table id="table_list_1"></table>
                        <div id="pager_list_1"></div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<div id="authConfirm" class="modal fade" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    会员认证审核
                </h4>
            </div>

            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12">
                        <form  id="auditConfirmForm" role="form">
                            <div class="wrapper wrapper-content animated fadeInRight">
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="ibox float-e-margins">
                                            <div class="ibox-title">
                                                <h5>申请认证</h5>
                                                <div class="ibox-tools">
                                                    <a class="collapse-link">
                                                        <!--<i class="fa fa-chevron-up"></i>-->
                                                    </a>
                                                    <a class="dropdown-toggle" data-toggle="dropdown" href="form_wizard.html#">
                                                        <!--<i class="fa fa-wrench"></i>-->
                                                    </a>
                                                    <ul class="dropdown-menu dropdown-user">
                                                        <li><a href="form_wizard.html#">选项1</a>
                                                        </li>
                                                        <li><a href="form_wizard.html#">选项2</a>
                                                        </li>
                                                    </ul>
                                                    <a class="close-link">
                                                        <!--<i class="fa fa-times"></i>-->
                                                    </a>
                                                </div>
                                            </div>
                                            <div class="ibox-content">
                                                <div id="wizard">
                                                    <h1>第一步</h1>
                                                    <div class="step-content" style="position: relative;">
                                                        <div class="text-center m-t-md">
                                                            <div class="ibox-content">
                                                                <form method="get" class="form-horizontal">
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">个人信息</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">真实姓名：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">性别：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">手机号：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">邮箱：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">身份证</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">身份证：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">身份证电子版：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="file" class="form-control"  style="height: 33px">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">转业状态</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">转业状态</label>

                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>安置后离职</option>
                                                                                <option>自主</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">自主择业证（选填）</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">自主择业证号：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">自主择业证电子版：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="file" class="form-control" style="height: 33px">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">常住地（选填）</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">常住地（省-市-区）</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>

                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <div class="col-sm-4 col-sm-offset-2">
                                                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                                                            <button class="btn btn-white" type="submit">取消</button>
                                                                        </div>
                                                                    </div>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <h1>第二步</h1>
                                                    <div class="step-content" style="position: relative;">
                                                        <div class="text-center m-t-md">
                                                            <div class="ibox-content">
                                                                <form method="get" class="form-horizontal">
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">原工作信息</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">原工作类别：</label>
                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>军委</option>
                                                                                <option>战区</option>
                                                                                <option>陆军</option>
                                                                                <option>空军</option>
                                                                                <option>海军</option>
                                                                                <option>战支</option>
                                                                                <option>火箭</option>
                                                                                <option>武警</option>
                                                                                <option>联勤</option>
                                                                                <option>院校</option>
                                                                                <option>院所</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">原工作属性：</label>
                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>行政</option>
                                                                                <option>行管</option>
                                                                                <option>技术</option>
                                                                                <option>管理</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">行政职务</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">行政职务：</label>
                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>参谋</option>
                                                                                <option>干事</option>
                                                                                <option>助理</option>
                                                                                <option>科级</option>
                                                                                <option>处级</option>
                                                                                <option>局级</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">技术职务</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">技术职称等级：</label>
                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>初级职称</option>
                                                                                <option>中级职称</option>
                                                                                <option>高级职称</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">技术职称系列：</label>
                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>工程系列</option>
                                                                                <option>研究系列</option>
                                                                                <option>教育系列</option>
                                                                                <option>体疗系列</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">国家认证职业资格证（选填）</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <a class="btn btn-default btn-rounded btn-block" href="buttons.html#"><i class="fa fa-info-circle"></i> 添加国家认证职业资格证书</a>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">单位名称：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <div class="col-sm-10">
                                                                            <input type="file" class="form-control" style="height: 33px">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">培训经历</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">学士</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">学院：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">专业：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">硕士</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">学院：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">专业：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">博士</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">学院：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">专业：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">博士后</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">学院：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">专业：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">初学问者</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">学院：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">专业：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>

                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <div class="col-sm-4 col-sm-offset-2">
                                                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                                                            <button class="btn btn-white" type="submit">取消</button>
                                                                        </div>
                                                                    </div>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <h1>第三步</h1>
                                                    <div class="step-content" style="position: relative;">
                                                        <div class="text-center m-t-md">
                                                            <div class="ibox-content">
                                                                <form method="get" class="form-horizontal">
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">现工作状态</label>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">现工作状态类型：</label>
                                                                        <div class="col-sm-10">
                                                                            <select class="form-control m-b" name="account"  style="height: 33px">
                                                                                <option>就业</option>
                                                                                <option>创业</option>
                                                                                <option>待业</option>
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <label class="col-sm-2 control-label">单位名称：</label>
                                                                        <div class="col-sm-10">
                                                                            <input type="text" class="form-control">
                                                                        </div>
                                                                    </div>
                                                                    <div class="hr-line-dashed"></div>
                                                                    <div class="form-group">
                                                                        <div class="col-sm-4 col-sm-offset-2">
                                                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                                                            <button class="btn btn-white" type="submit">取消</button>
                                                                        </div>
                                                                    </div>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>

                        </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button"   onclick="memberAudit('VERIFY_SUCCESS')" class="btn btn-primary">
                    审核通过
                </button>
                <button type="button"  onclick="memberAudit('VERIFY_FAIL')" class="btn btn-default"  >
                    审核不通过
                </button>
            </div>
        </div>
    </div>
</div>

</div>
    <script th:inline="javascript">
        /*<![CDATA[*/
        ctxPath = /*[[@{/}]]*/ '';
        /*]]>*/

        function memberAudit(authState) {
            $('#authStateInput').val(authState);
            var url ="auditMemberAuth.action" ;
            $.ajax({
                type: "post",
                url: url,
                data: $('#auditConfirmForm').serialize(),
                dataType: "json",
                async: false,
                success: function (data) {
                    if(data!=null && data.success){
                        alert("审核成功!");
                        $("#table_list_1").trigger("reloadGrid");
                    }else {
                        alert(data.message);
                    }

                }
            });
            // });
        }
    </script>


<!-- 全局js -->
<script th:src="@{../../back/js/jquery.min.js?v=2.1.4}"></script>
<script th:src="@{../../back/js/bootstrap.min.js?v=3.3.6}"></script>



<!-- Peity -->
<script th:src="@{../../back/js/plugins/peity/jquery.peity.min.js}"></script>
<!-- jqGrid -->
<script th:src="@{../../back/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820}"></script>
<script th:src="@{../../back/js/plugins/jqgrid/jquery.jqGrid.min.js?0820}"></script>

<!-- 自定义js -->
<script  th:src="@{../../back/js/content.js?v=1.0.0}"></script>

<!-- layerDate plugin javascript -->
<script th:src="@{../../back/js/plugins/layer/laydate/laydate.js}"></script>


<script th:inline="javascript">
    /*<![CDATA[*/
    ctxPath = /*[[@{/}]]*/ '';
    /*]]>*/
</script>
<!-- Page-Level Scripts -->
<script>
    $(document).ready(function () {
        $.jgrid.defaults.styleUI = 'Bootstrap';
        // Configuration for jqGrid Example 1
        $("#table_list_1").jqGrid({
            url:ctxPath+'back/memberAuth/queryMemberAuthApplyList.action',
            mtype:"POST",
            datatype: "json",
            sortname : 'createTime',
            sortorder : "desc",
            height: 550,
            autowidth: true,
            shrinkToFit: true,
            rowNum: 10,
            rowList: [10, 20, 30],
            colNames: [ '真实姓名','openid',  '性别', '关注时间','认证时间', '操作'],
            colModel: [
                {
                    name: 'realName',
                    index: 'realName',
                },
                {
                    name: 'openid',
                    index: 'openid',
                },
                {
                    name: 'memberSex',
                    index: 'memberSex',
                    formatter: memberSexTemplet
                },
                {
                    name: 'subscribeTime',
                    index: 'subscribeTime',
                    sorttype: "date",
                    formatter: "date"
                },
                {
                    name: 'createTime',
                    index: 'createTime',
                    sorttype: "date",
                    formatter: "date"
                },
                {
                    name: 'note',
                    index: 'note',
                    sortable: false,
                    align: "center",
                    sortable: false,
                    editable: false,
                    formatter: alarmFormatter
                }
            ],
            pager: "#pager_list_1",
            viewrecords: true,
            jsonReader: {
                root : "resultList", // 服务端保存数据的集合
                id: "id", //相当于设置主键
                total: "pageSize",　　 //总页数
                page: "currentPage",　　//当前页
                records: "totalRecord",//总记录数
                repeatitems: false,
                cell: "resultList"

            },
             caption: "会员认证审核",
            hidegrid: false
        });


        $(function(){



            $("#queryButton").click(function(){
                var memberId = escape($("#queryMemberId").val());

                $("#table_list_1").jqGrid('setGridParam', {
                    url: ctxPath+'back/memberAuth/queryMemberAuthApplyList.action',
                    postData:{'memberId':memberId}, //发送数据
                    page: 1
                }).trigger("reloadGrid");

            });
        });


        //自定义格式列格式
        function alarmFormatter(cellvalue, options, rowObject){

            var imageHtml =" <input data-toggle='modal' data-target='#authConfirm' type='button' onclick=\"showAuth("+rowObject.id+")\" value='审核'  />";
            return imageHtml;
         }

        function memberSexTemplet(cellvalue, options, rowObject){
            if(cellvalue=="MALE"){
                return "男";
            }else if(cellvalue=="FEMALE"){
                return "女";
            }else{
                return cellvalue;
            }

        }


        // Add responsive to jqGrid
        $(window).bind('resize', function () {
            var width = $('.jqGrid_wrapper').width()+18;
            $('#table_list_1').setGridWidth(width);
            $('#table_list_2').setGridWidth(width);
        });
    });




    function showAuth(rowId){
        $('#editButton').show();
        $('#id').val(rowId);
        $.ajax({
            type: "post",
            url: ctxPath+'back/memberAuth/queryMemberAuthApplyDetail.action',
            data:{'id':rowId},
            dataType: "json",
            async: false,
            success: function (data) {
                if(data!=null && data.success){
                    $('#noticeContent').attr('readonly',false);
                    $('#noticeContent').val(data.result);

                }else {
                    alert(data.message);
                }
            }
        });

    }

</script>


</body>

</html>
